﻿using System;
namespace JSShop.Model
{
    /// <summary>
    /// Hishop_Gifts:实体类(属性说明自动提取数据库字段的描述信息)
    /// </summary>
    [Serializable]
    public partial class Hishop_Gifts
    {
        public Hishop_Gifts()
        { }
        #region Model
        private int _giftid;
        private string _name;
        private string _shortdescription;
        private string _unit;
        private string _longdescription;
        private string _title;
        private string _meta_description;
        private string _meta_keywords;
        private decimal? _costprice;
        private string _imageurl;
        private string _thumbnailurl40;
        private string _thumbnailurl60;
        private string _thumbnailurl100;
        private string _thumbnailurl160;
        private string _thumbnailurl180;
        private string _thumbnailurl220;
        private string _thumbnailurl310;
        private string _thumbnailurl410;
        private decimal? _marketprice;
        private int _needpoint = 0;
        private bool _ispromotion;
        private int? _stock;
        /// <summary>
        /// 
        /// </summary>
        public int GiftId
        {
            set { _giftid = value; }
            get { return _giftid; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string Name
        {
            set { _name = value; }
            get { return _name; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string ShortDescription
        {
            set { _shortdescription = value; }
            get { return _shortdescription; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string Unit
        {
            set { _unit = value; }
            get { return _unit; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string LongDescription
        {
            set { _longdescription = value; }
            get { return _longdescription; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string Title
        {
            set { _title = value; }
            get { return _title; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string Meta_Description
        {
            set { _meta_description = value; }
            get { return _meta_description; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string Meta_Keywords
        {
            set { _meta_keywords = value; }
            get { return _meta_keywords; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? CostPrice
        {
            set { _costprice = value; }
            get { return _costprice; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string ImageUrl
        {
            set { _imageurl = value; }
            get { return _imageurl; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string ThumbnailUrl40
        {
            set { _thumbnailurl40 = value; }
            get { return _thumbnailurl40; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string ThumbnailUrl60
        {
            set { _thumbnailurl60 = value; }
            get { return _thumbnailurl60; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string ThumbnailUrl100
        {
            set { _thumbnailurl100 = value; }
            get { return _thumbnailurl100; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string ThumbnailUrl160
        {
            set { _thumbnailurl160 = value; }
            get { return _thumbnailurl160; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string ThumbnailUrl180
        {
            set { _thumbnailurl180 = value; }
            get { return _thumbnailurl180; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string ThumbnailUrl220
        {
            set { _thumbnailurl220 = value; }
            get { return _thumbnailurl220; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string ThumbnailUrl310
        {
            set { _thumbnailurl310 = value; }
            get { return _thumbnailurl310; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string ThumbnailUrl410
        {
            set { _thumbnailurl410 = value; }
            get { return _thumbnailurl410; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? MarketPrice
        {
            set { _marketprice = value; }
            get { return _marketprice; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int NeedPoint
        {
            set { _needpoint = value; }
            get { return _needpoint; }
        }
        /// <summary>
        /// 
        /// </summary>
        public bool IsPromotion
        {
            set { _ispromotion = value; }
            get { return _ispromotion; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? Stock
        {
            set { _stock = value; }
            get { return _stock; }
        }
        #endregion Model

        public int SubPointTotal
        {
            get
            {
                if (this.PromoType <= 0)
                {
                    return (this.NeedPoint * this.Quantity);
                }
                return 0;
            }
        }
        public int PromoType { get; set; }
        public int Quantity { get; set; }
    }
}

